package com.atguigu.gmall.feign.ware;

import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

//feign可以发送任何http请求
//url精确指定请求地址
@FeignClient(value = "ware-manage",url = "http://localhost:9001")
public interface WareFeignClient {

    //  /hasStock?skuId=10221&num=2
    @GetMapping("/hasStock")
    String hasStock(@RequestParam("skuId") Long skuId,@RequestParam("num") Integer num);
}
